package com.d3works.apps.sale.service.saleorder;

import com.d3works.apps.base.db.CancelReason;
import com.d3works.apps.base.db.Company;
import com.d3works.apps.base.db.Partner;
import com.d3works.apps.sale.db.SaleOrder;
import com.d3works.exception.D3worksException;
import com.google.inject.persist.Transactional;

public interface SaleOrderWorkflowService {

  @Transactional
  Partner validateCustomer(SaleOrder saleOrder);

  String getSequence(Company company) throws D3worksException;

  void cancelSaleOrder(SaleOrder saleOrder, CancelReason cancelReason, String cancelReasonStr)
      throws D3worksException;

  void finalizeQuotation(SaleOrder saleOrder) throws D3worksException;

  void confirmSaleOrder(SaleOrder saleOrder) throws D3worksException;

  void saveSaleOrderPDFAsAttachment(SaleOrder saleOrder) throws D3worksException;

  String getFileName(SaleOrder saleOrder);

  void completeSaleOrder(SaleOrder saleOrder) throws D3worksException;
}
